package com.suxin.aop;

import org.springframework.aop.Pointcut;
import org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor;

/**
 * @author Tang
 * @classname DefaultBeanFactoryPointcutAdvisor
 * @description [  ]
 * @date 2021/12/5 14:15
 */
public class DefaultBeanFactoryPointcutAdvisor extends AbstractBeanFactoryPointcutAdvisor {

    private Pointcut pointcut;

    public DefaultBeanFactoryPointcutAdvisor(Pointcut pointcut) {
        this.pointcut = pointcut;
    }

    @Override
    public Pointcut getPointcut() {
        return this.pointcut;
    }

    @Override
    public String toString() {
        return this.getClass().getName() + ": pointcut [" + this.getPointcut() + "]; advice bean '" + this.getAdviceBeanName() + "'";
    }
}